<template>
  <el-popover
    :placement="placement"
    :width="width"
    trigger="click"
  >
    <template #reference>
      <div class="popoverBtn">
        <slot name="btn"/>
      </div>
    </template>
    <slot/>
  </el-popover>
</template>
<script>
export default {
  name: "PopoverBox",
  props: {
    placement:{
      type:String,
      default: () => {
        return 'bottom';
      },
    },
    width:{
      type:Number,
      default: () => {
        return 220;
      },
    },
  }, // 获取父组件数据
  components: {

  },
  created() {

  },
  data() {
    return {

    };
  },
  methods: {

  },
  computed: {

  }
};
</script>
<style  lang="scss" scoped>
.popoverBtn{
  display: flex;
  align-items: center;
  cursor: pointer;
}
</style>
